package com.example.config.security.domain;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

@Configuration
@RefreshScope
@ConfigurationProperties(prefix="oauth2.client")
public class OauthConfig {

	private String clientId;
	private String clientSecret;
	private String[] scope;
	private int accessTokenValiditySeconds;
	private int refreshTokenValiditySeconds;
	private String[] autoApproveScopes;
	private String[] authorizedGrantTypes;
	
	public String getClientId() {
		return clientId;
	}
	public void setClientId(String clientId) {
		this.clientId = clientId;
	}
	public String getClientSecret() {
		return clientSecret;
	}
	public void setClientSecret(String clientSecret) {
		this.clientSecret = clientSecret;
	}
	public String[] getScope() {
		return scope;
	}
	public void setScope(String[] scope) {
		this.scope = scope;
	}
	public int getAccessTokenValiditySeconds() {
		return accessTokenValiditySeconds;
	}
	public void setAccessTokenValiditySeconds(int accessTokenValiditySeconds) {
		this.accessTokenValiditySeconds = accessTokenValiditySeconds;
	}
	public int getRefreshTokenValiditySeconds() {
		return refreshTokenValiditySeconds;
	}
	public void setRefreshTokenValiditySeconds(int refreshTokenValiditySeconds) {
		this.refreshTokenValiditySeconds = refreshTokenValiditySeconds;
	}
	public String[] getAutoApproveScopes() {
		return autoApproveScopes;
	}
	public void setAutoApproveScopes(String[] autoApproveScopes) {
		this.autoApproveScopes = autoApproveScopes;
	}
	public String[] getAuthorizedGrantTypes() {
		return authorizedGrantTypes;
	}
	public void setAuthorizedGrantTypes(String[] authorizedGrantTypes) {
		this.authorizedGrantTypes = authorizedGrantTypes;
	}

}
